<!DOCTYPE html>
<html>
	<head>
	  <meta charset="UTF-8">
	  <title>测试</title>
	  <link href="../../../assets/lib/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
	  <script type="text/javascript" src="third-party/jquery.min.js"></script>
	  <script type="text/javascript" charset="utf-8" src="umeditor.config.js"></script>
	  <script type="text/javascript" charset="utf-8" src="umeditor.min.js"></script>
	  <script type="text/javascript" src="umeditor/lang/zh-cn/zh-cn.js"></script>
	  
	</head>
	<body>
	<!--	<script type="text/plain" id="myEditor" style="width:1000px;height:240px;">
		
		</script>
		
		<script type="text/javascript">
			var um = UM.getEditor('myEditor');
		</script>
		-->
			<h1>UMEDITOR 文本域渲染编辑器</h1>
		
		<!--style给定宽度可以影响编辑器的最终宽度-->
		<textarea id="myEditor" style="width:800px;height:240px;">请输入内容</textarea>
		<br/>
		<input type="button" onclick="render()" value="渲染编辑器">
		
		<input type="button" onclick="getAllHtml()" value="获得整个html的内容">
		
		<script type="text/javascript"> 
			//渲染编辑器
//			function render() {
//				var um = UM.getEditor('myEditor');
//			}
			var um = UM.getEditor('myEditor');
			
			//获得整个html的内容
			function getAllHtml() {
	        	alert(UM.getEditor('myEditor').getAllHtml());
	        	console.log(UM.getEditor('myEditor').getAllHtml())
	    	}
		</script>
			
	</body>
</html>
